//package com.bussiness.dingding.controller;
//
//import com.bussiness.dingding.util.DingTreeUtil;
//import com.common.response.ResponseBean;
//import com.common.response.impl.BaseResponseImpl;
//import com.common.util.mypage.Pages;
//import com.common.vo.TreeVo;
//import com.dingding.service.ProcessService;
//import com.dingtalk.api.response.OapiDepartmentListResponse;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
///**
// * @description:
// * @author: zyj
// * @create: 2020-03-10 13:28
// **/
//@RestController
//@Api(tags={"钉钉用户信息"})
//@RequestMapping("/dingdingUser")
//public class UserController extends BaseResponseImpl {
//
//    @Autowired
//    private ProcessService processService;
//
//    @RequestMapping(value = "/listDept", method = RequestMethod.GET)
//    @ApiOperation(value = "获取部门列表")
//    public ResponseBean listDept(@RequestParam String deptId){
//        List<OapiDepartmentListResponse.Department> list = processService.getDept(deptId);
//        List<TreeVo> treeVoList = DingTreeUtil.coverTree(list);
//        return successData(treeVoList);
//    }
//
//    @RequestMapping(value = "/listUser", method = RequestMethod.GET)
//    @ApiOperation(value = "根据部门id获取用户列表")
//    public ResponseBean listUser(@RequestParam String deptId,@RequestParam Integer pageNumber,@RequestParam Integer pageSize){
//        List list = processService.getUserByDept(deptId, pageNumber, pageSize);
//        Pages pages = new Pages(pageNumber, pageSize);
//        pages.setRows(list);
//        return successData(pages);
//    }
//
//
//    @RequestMapping(value = "/listProcessTemp", method = RequestMethod.GET)
//    @ApiOperation(value = "获取流程模板列表")
//    public ResponseBean listProcessTemp(@RequestParam Integer pageNumber,@RequestParam Integer pageSize){
//        List list = processService.listProcess(pageNumber, pageSize);
//        Pages pages = new Pages(pageNumber, pageSize);
//        pages.setRows(list);
//        return successData(pages);
//    }
//}
